<h1>Listing items</h1>

<table>
  <tr>
    <th>Brand</th>
    <th>Name</th>
    <th>Measure</th>
  </tr>

<% for item in @items %>
  <tr>
    <td><%=h item.brand.name %></td>
    <td><%=h item.name %></td>
    <td><%=h item.measure %></td>
    <td><%= link_to image_tag("view.gif"), item %></td>
    <td><%= link_to image_tag("edit.gif"), edit_item_path(item) %></td>
    <td><%= link_to image_tag("delete.gif"), item, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New item', new_item_path %>
